lib: mmap the summary to reduce RSS in clients
authorRichard Hughes <richard@hughsie.com>
Wed, 8 May 2019 19:23:17 +0000 (20:23 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 8 May 2019 19:36:24 +0000 (19:36 +0000)
Closes: #1855
Closes: #1856
Approved by: cgwalters

src/libostree/ostree-repo-pull.c

index 489355234a5a72fd2abebd192abc32e7989916d1..7ae992ad9f067388144abe1ef1761b382a078f2e 100644 (file)
@@ -2868,7 +2868,7 @@ _ostree_repo_load_cache_summary_if_same_sig (OstreeRepo        *self,
   if (prev_fd < 0)
     return TRUE; /* Note early return */
 
-  g_autoptr(GBytes) old_sig_contents = glnx_fd_readall_bytes (prev_fd, cancellable, error);
+  g_autoptr(GBytes) old_sig_contents = ot_fd_readall_or_mmap (prev_fd, 0, error);
   if (!old_sig_contents)
     return FALSE;